<template>
  <el-menu
      default-active="1"
      background-color="#545c64"
      text-color="#fff"
      unique-opened
      active-text-color="#ffd04b" router>
      <!-- 无子级目录：首页 -->
      <el-menu-item index="/home">
        <i class="el-icon-menu"></i>
        <span>首页</span>
      </el-menu-item>

      <!-- 无子级目录：数据管理 -->
      <el-menu-item index="/statistics">
        <i class="el-icon-s-grid"/>
        <span>数据管理</span>
      </el-menu-item>

      <!-- 有子级目录：信息管理 -->
      <el-submenu index="/info">
        <template v-slot:title="title">
          <i class="el-icon-s-tools"/>
          <span>信息管理</span>
        </template>
        <!-- <el-menu-item index="/info">
          <i class="el-icon-s-tools"></i>
          <span>信息管理</span>
        </el-menu-item> -->
        <el-menu-item index="/info/infolist">
          <i class="el-icon-document"></i>
          <span>信息列表</span>
        </el-menu-item>
      </el-submenu>
      <!-- 用户信息 -->
      <el-submenu index="/user">
        <template v-slot:title="title">
          <i class="el-icon-user"></i>
          <span>用户信息</span>
        </template>
        <el-menu-item index="/user/role">
          <i class="el-icon-user-solid"></i>
          <span>用户角色</span>
        </el-menu-item>
        <el-menu-item index="/user/userlist">
          <i class="el-icon-s-custom"></i>
          <span>用户列表</span>
        </el-menu-item>
      </el-submenu>
  </el-menu>
  <span>{{showRS}}</span>
</template>

<script>
import {Location,Document,Menu as IconMenu,Setting,Avatar} from '@element-plus/icons-vue'
import routers from '@/components/config/routers.js'
export default {
  name: "",
  components: {Location,Document,IconMenu,Setting,Avatar},
  data() {
    return {
      rs:routers
    };
  },
  created() {
    this.getRoute()
  },
  computed: {
    showRS(){
      // console.log('the showrs: ',routers)
    }
  },
  methods: {
    getRoute(){
      // console.log('the rs options.routes: ',this.rs.options.routes)
      // console.log('the rs: ',this.rs)
    }
  },
};
</script>
<style></style>
